#define  _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
void main()
{
	int n, i = 0, a[100], x = 0, j = 0, y = 0;
	scanf("%d", &n);
	for (i = 0; i<n; i++)
		scanf("%d", &a[i]);
	for (i = 0; i < n; i++)
	{
		if (a[i] % 2 == 0)
			x++;
	}
	for (i = 0; i < n; i++)
	{
		for (j = 2; j < a[i]; j++)
		{
			if (a[i] % j == 0)
				break;
		}
		if (j >= a[i] && a[i] != 1)
			y++;
	}
	printf("%d %d", y, x);
}
